<template>
  <section>
     <!-- 面包屑 -->
 <breadcrumbs></breadcrumbs>
   <div>
          <el-row class="mgb-20">
              <el-col :span="12">
                  <span>订单状态：</span>
                  <span class="f18">1</span>
              </el-col>
          </el-row>
          <!-- <el-row class="mgb-20">
              <el-col :span="12">订单号：{{integralOrder.orderNo}}</el-col>
              <el-col :span="12">兑换时间：{{integralOrder.addTime}}</el-col>
          </el-row>
          <el-row class="mgb-20">
              <el-col :span="12">支付时间：{{integralOrder.addTime}}</el-col>
              <el-col :span="12" v-if="integralOrder.orderIntegral>0||integralOrder.orderPrice>0">
                  <span>支付金额：</span>
                  <span v-if="integralOrder.orderIntegral>0">{{integralOrder.orderIntegral}}积分；</span>
                  <span v-if="integralOrder.orderPrice>0">{{integralOrder.orderPrice}}元；</span>
              </el-col>
          </el-row>
          <el-row class="mgb-20">
              <el-col :span="12">收货人：{{integralOrder.pickupName}}</el-col>
              <el-col :span="12">联系电话：{{integralOrder.pickupPhone}}</el-col>
          </el-row>
          <el-row class="mgb-20">
              <el-col :span="24">收货地址：{{integralOrder.pickupAddress}}</el-col>
          </el-row>
          <el-row class="mgb-20">
              <el-col :span="12">配送方式：{{integralOrder.deliverType}}</el-col>
          </el-row>
        
          <el-row class="mgb-20" v-if="integralOrder.expressCompany||integralOrder.expressNum">
              <el-col :span="12" v-if="integralOrder.expressCompany">物流公司：{{integralOrder.expressCompany}}</el-col>
              <el-col :span="12" v-if="integralOrder.expressNum">物流单号：{{integralOrder.expressNum}}</el-col>
          </el-row>
          <el-divider content-position="left">
              <span class="f18">兑换商品信息</span>
          </el-divider>
          <el-table :data="integralGoods" border style="width: 100%">
              
              <el-table-column prop="goodsName" label="商品">
              </el-table-column>
              <el-table-column prop="goodsIntegral" label="金额">
                  <template slot-scope="scope">
                      <span v-if="scope.row.goodsIntegral>0">{{scope.row.goodsIntegral}}积分；</span>
                      <span v-if="scope.row.goodsPrice>0">{{scope.row.goodsPrice}}元；</span>
                  </template>
              </el-table-column>
              <el-table-column prop="orderGoodsNum" label="兑换数量">
              </el-table-column>
          </el-table> -->
      </div>
      <!-- <div slot="footer" class="dialog-footer">
          <el-button @click="dialogVisible = false">关 闭</el-button>
          <el-button type="primary" @click="orderShip(studentInfo)" v-if="integralOrder.orderStatus==2">确认发货</el-button>
      </div> -->
   
  </section>
</template>

<script>
import btns from "@/components/btns.vue";
import Editor from "@/components/edit";
import mixins from "@/utils/mixins";
import breadcrumbs from "@/components/breadcrumbs.vue";
export default {
  mixins: [mixins],
  components: {
    btns,
    Editor,
     breadcrumbs,
  },
  data() {
    var FengValidate = (rule, value, callback) => {
      // console.log(this.addfile);
      if (this.addfile == "") {
        callback(new Error("请选择封面图片"));
      }
      // if (value == null || value == '') {
      //   this.activeNames = ['2'];
      // }
    };
    return {
         orderStatus: {
                1: '待支付',
                2: '待发货',
                3: '待取货',
                4: '完成',
            },
            ud:"",
            integralOrder:[],
            integralGoods:[],
            cjbintegralOrder:[],
            cjbintegralGoods:[],
            tableData: [],
        orderInfo:[],
      editImgFile:[],
      filesEdit:[],
        agencyId: this.$route.query.jid,
        wenzhanglist:[],
        importFileUrl: this.GLOBAL.imgBaseUrl,
    };
  },
  created() {

    this.fenleilist();

  },
  methods: {
    getUrlListEdit (item) {
      this.$message({
        type: 'success',
        message: '图片上传成功'
      });
      // console.log('filesEdit', this.filesEdit);
      // this.EditForm.addfile = item;
      // this.$set(this.EditForm, 'affile', item);
      let list = [];
      let obj = {};
      obj.index = 1;
      obj.url = item;
      this.filesEdit.push(obj);
      // this.filesEdit.forEach(() => {
      //   list.push(item.data.url)
      // })
      // console.log('11112323232123123', this.filesEdit);
      // console.log(list);
      // console.log('add', this.editForm.addfile);
      // list.push(this.EditForm.addfile);
      // this.filesEdit = list;
      // 
      console.log('editImgList============================', this.filesEdit);
    },
    beforeAvatarUpload (file) {
      console.log(file, 231232)
      const isLt2M = file.size / 1024 / 1024 < 10;
      if (!isLt2M) {
        this.$message.error('上传头像图片大小不能超过 10MB!');
      }
      return isLt2M;
    },
    
    fenleilist(){
          {
          this.$api.integral.orderInfo({ id:this.agencyId }).then(d => {
                if (d.code == 200) {
                    this.orderInfo = d.data;
                    this.cjbintegralOrder = d.data.integralOrder;
                    this.cjbintegralGoods = d.data.integralGoods;
                    this.ud=this.cjbintegralGoods.addUid; 
                    console.log("zhegeidshi"+this.ud)
                    this.dialogVisible = true;
                }
            }).catch(e => {
                console.log(e);
            })
        }
      },
  }
};
</script>

<style lang="scss" scoped>
.dialog-footer {
  margin-top: 50px;
}
.img-feng {
  width: 120px;
  height: 120px;
}
.goods {
  width: 500px;
}
.icon {
  display: flex;
  justify-content: space-between;
  i {
    font-size: 25px;
  }
}
.fengmian{
    height: 10%;
    width: 10%;
}
.wenzhang{
    font-size: 20px;
    font-weight: 700;
}
.biaoti{
    font-size: 15px;
    font-weight: 700;
}
</style>
